<script setup lang="ts">
import { ref } from 'vue'
import router from '@/router/index'

const MyMusicList = ref({
  title: '我的音乐',
  list: [
    {
      name: '我喜欢',
      path: '/myLike',
      iconClass: 'iconfont icon-lv_ilike'
    },
    {
      name: '本地和下载',
      path: '/localAndDownload',
      iconClass: 'iconfont icon-lv_local'
    },
    {
      name: '最近播放',
      path: '/recentlyPlayed',
      iconClass: 'iconfont icon-lv_history'
    },
    {
      name: '播放队列',
      path: '/auditionList',
      iconClass: 'iconfont icon-liebiao'
    }
  ]
})
</script>

<template>
  <div class="nav-mine">
      <dl>
        <dt><span  class="left-dt">{{ MyMusicList.title }}</span></dt>
        <dd v-for="item in MyMusicList.list"
            :key="item.name">
          <router-link :to="item.path">
            <i :class="item.iconClass"></i><span>{{ item.name }}</span>
          </router-link>
          </dd>
      </dl>
  </div>
</template>

<style lang="scss" scoped>
dt {
  width: 200px;
  .left-dt {
    margin-left: 40px;
    display: inline-block;
    font-size: 12px;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 320;
  }
}
dd {
  display: inline-block;
  margin-left: 20px;
}

a{
  display: block;
  width: 150px;
  height: 30px;
  /*margin-left: 10px;*/
  text-decoration: none;
  color: black;
  font-size: 14px;
  padding-left: 20px;
  margin-top: 5px;
  margin-bottom: 5px;
  line-height: 30px;
  border-radius: 5px;

  &:hover{
    background-color: var( --color-bg-hover);
  }

  &.active{
    //background-color: #1ecf9d;
    background: var(--color-bg-active);
    color: white;
  }

  .iconfont{
    margin-right: 8px;
    font-size: 18px;
  }

}

</style>